3.1.96 \(\int \text {sech}^4(c+d x) (a+b \tanh ^2(c+d x))^2 \, dx\) [96]

3.1.96.1 Optimal result
3.1.96.2 Mathematica [A] (verified)
3.1.96.3 Rubi [A] (verified)
3.1.96.4 Maple [B] (verified)
3.1.96.5 Fricas [B] (verification not implemented)
3.1.96.6 Sympy [F]
3.1.96.7 Maxima [B] (verification not implemented)
3.1.96.8 Giac [B] (verification not implemented)
3.1.96.9 Mupad [B] (verification not implemented)

3.1.96.1 Optimal result

Integrand size = 23, antiderivative size = 76 \[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {a^2 \tanh (c+d x)}{d}-\frac {a (a-2 b) \tanh ^3(c+d x)}{3 d}-\frac {(2 a-b) b \tanh ^5(c+d x)}{5 d}-\frac {b^2 \tanh ^7(c+d x)}{7 d} \]

output
a^2*tanh(d*x+c)/d-1/3*a*(a-2*b)*tanh(d*x+c)^3/d-1/5*(2*a-b)*b*tanh(d*x+c)^ 
5/d-1/7*b^2*tanh(d*x+c)^7/d
 
3.1.96.2 Mathematica [A] (verified)

Time = 1.86 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.09 \[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {\left (70 a^2+28 a b+6 b^2+\left (35 a^2+14 a b+3 b^2\right ) \text {sech}^2(c+d x)-6 b (7 a+4 b) \text {sech}^4(c+d x)+15 b^2 \text {sech}^6(c+d x)\right ) \tanh (c+d x)}{105 d} \]

input
Integrate[Sech[c + d*x]^4*(a + b*Tanh[c + d*x]^2)^2,x]
 
output
((70*a^2 + 28*a*b + 6*b^2 + (35*a^2 + 14*a*b + 3*b^2)*Sech[c + d*x]^2 - 6* 
b*(7*a + 4*b)*Sech[c + d*x]^4 + 15*b^2*Sech[c + d*x]^6)*Tanh[c + d*x])/(10 
5*d)
 
3.1.96.3 Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4158, 290, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sec (i c+i d x)^4 \left (a-b \tan (i c+i d x)^2\right )^2dx\)

\(\Big \downarrow \) 4158

\(\displaystyle \frac {\int \left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )^2d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 290

\(\displaystyle \frac {\int \left (-b^2 \tanh ^6(c+d x)-(2 a-b) b \tanh ^4(c+d x)-a (a-2 b) \tanh ^2(c+d x)+a^2\right )d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 \tanh (c+d x)-\frac {1}{5} b (2 a-b) \tanh ^5(c+d x)-\frac {1}{3} a (a-2 b) \tanh ^3(c+d x)-\frac {1}{7} b^2 \tanh ^7(c+d x)}{d}\)

input
Int[Sech[c + d*x]^4*(a + b*Tanh[c + d*x]^2)^2,x]
 
output
(a^2*Tanh[c + d*x] - (a*(a - 2*b)*Tanh[c + d*x]^3)/3 - ((2*a - b)*b*Tanh[c 
 + d*x]^5)/5 - (b^2*Tanh[c + d*x]^7)/7)/d
 

3.1.96.3.1 Defintions of rubi rules used

rule 290
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> I 
nt[ExpandIntegrand[(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d 
}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4158
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ 
)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim 
p[ff/(c^(m - 1)*f)   Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ 
p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I 
ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] 
 || EqQ[n^2, 16])
 
3.1.96.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(157\) vs. \(2(70)=140\).

Time = 29.89 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.08

method result size
derivativedivides \(\frac {a^{2} \left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{4 \cosh \left (d x +c \right )^{5}}+\frac {\left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{4}\right )+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{4 \cosh \left (d x +c \right )^{7}}-\frac {\sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{7}}+\frac {\left (\frac {16}{35}+\frac {\operatorname {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \operatorname {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \operatorname {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{8}\right )}{d}\) \(158\)
default \(\frac {a^{2} \left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{4 \cosh \left (d x +c \right )^{5}}+\frac {\left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{4}\right )+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{4 \cosh \left (d x +c \right )^{7}}-\frac {\sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{7}}+\frac {\left (\frac {16}{35}+\frac {\operatorname {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \operatorname {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \operatorname {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{8}\right )}{d}\) \(158\)
risch \(-\frac {4 \left (105 a^{2} {\mathrm e}^{10 d x +10 c}+210 a b \,{\mathrm e}^{10 d x +10 c}+105 b^{2} {\mathrm e}^{10 d x +10 c}+455 a^{2} {\mathrm e}^{8 d x +8 c}+350 a b \,{\mathrm e}^{8 d x +8 c}-105 b^{2} {\mathrm e}^{8 d x +8 c}+770 a^{2} {\mathrm e}^{6 d x +6 c}+140 a b \,{\mathrm e}^{6 d x +6 c}+210 b^{2} {\mathrm e}^{6 d x +6 c}+630 a^{2} {\mathrm e}^{4 d x +4 c}+84 a b \,{\mathrm e}^{4 d x +4 c}-42 \,{\mathrm e}^{4 d x +4 c} b^{2}+245 a^{2} {\mathrm e}^{2 d x +2 c}+98 a b \,{\mathrm e}^{2 d x +2 c}+21 \,{\mathrm e}^{2 d x +2 c} b^{2}+35 a^{2}+14 a b +3 b^{2}\right )}{105 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{7}}\) \(239\)

input
int(sech(d*x+c)^4*(a+b*tanh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
 
output
1/d*(a^2*(2/3+1/3*sech(d*x+c)^2)*tanh(d*x+c)+2*a*b*(-1/4*sinh(d*x+c)/cosh( 
d*x+c)^5+1/4*(8/15+1/5*sech(d*x+c)^4+4/15*sech(d*x+c)^2)*tanh(d*x+c))+b^2* 
(-1/4*sinh(d*x+c)^3/cosh(d*x+c)^7-1/8*sinh(d*x+c)/cosh(d*x+c)^7+1/8*(16/35 
+1/7*sech(d*x+c)^6+6/35*sech(d*x+c)^4+8/35*sech(d*x+c)^2)*tanh(d*x+c)))
 
3.1.96.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 677 vs. \(2 (70) = 140\).

Time = 0.25 (sec) , antiderivative size = 677, normalized size of antiderivative = 8.91 \[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {8 \, {\left (2 \, {\left (35 \, a^{2} + 56 \, a b + 27 \, b^{2}\right )} \cosh \left (d x + c\right )^{5} + 10 \, {\left (35 \, a^{2} + 56 \, a b + 27 \, b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + {\left (35 \, a^{2} + 98 \, a b + 51 \, b^{2}\right )} \sinh \left (d x + c\right )^{5} + 14 \, {\left (25 \, a^{2} + 16 \, a b - 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (10 \, {\left (35 \, a^{2} + 98 \, a b + 51 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 105 \, a^{2} + 126 \, a b - 63 \, b^{2}\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (10 \, {\left (35 \, a^{2} + 56 \, a b + 27 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + 21 \, {\left (25 \, a^{2} + 16 \, a b - 3 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + 28 \, {\left (25 \, a^{2} + 4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right ) + {\left (5 \, {\left (35 \, a^{2} + 98 \, a b + 51 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} + 63 \, {\left (5 \, a^{2} + 6 \, a b - 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 70 \, a^{2} + 28 \, a b + 126 \, b^{2}\right )} \sinh \left (d x + c\right )\right )}}{105 \, {\left (d \cosh \left (d x + c\right )^{9} + 9 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{8} + d \sinh \left (d x + c\right )^{9} + 7 \, d \cosh \left (d x + c\right )^{7} + {\left (36 \, d \cosh \left (d x + c\right )^{2} + 7 \, d\right )} \sinh \left (d x + c\right )^{7} + 7 \, {\left (12 \, d \cosh \left (d x + c\right )^{3} + 7 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{6} + 22 \, d \cosh \left (d x + c\right )^{5} + {\left (126 \, d \cosh \left (d x + c\right )^{4} + 147 \, d \cosh \left (d x + c\right )^{2} + 20 \, d\right )} \sinh \left (d x + c\right )^{5} + {\left (126 \, d \cosh \left (d x + c\right )^{5} + 245 \, d \cosh \left (d x + c\right )^{3} + 110 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{4} + 42 \, d \cosh \left (d x + c\right )^{3} + {\left (84 \, d \cosh \left (d x + c\right )^{6} + 245 \, d \cosh \left (d x + c\right )^{4} + 200 \, d \cosh \left (d x + c\right )^{2} + 28 \, d\right )} \sinh \left (d x + c\right )^{3} + {\left (36 \, d \cosh \left (d x + c\right )^{7} + 147 \, d \cosh \left (d x + c\right )^{5} + 220 \, d \cosh \left (d x + c\right )^{3} + 126 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + 56 \, d \cosh \left (d x + c\right ) + {\left (9 \, d \cosh \left (d x + c\right )^{8} + 49 \, d \cosh \left (d x + c\right )^{6} + 100 \, d \cosh \left (d x + c\right )^{4} + 84 \, d \cosh \left (d x + c\right )^{2} + 14 \, d\right )} \sinh \left (d x + c\right )\right )}} \]

input
integrate(sech(d*x+c)^4*(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")
 
output
-8/105*(2*(35*a^2 + 56*a*b + 27*b^2)*cosh(d*x + c)^5 + 10*(35*a^2 + 56*a*b 
 + 27*b^2)*cosh(d*x + c)*sinh(d*x + c)^4 + (35*a^2 + 98*a*b + 51*b^2)*sinh 
(d*x + c)^5 + 14*(25*a^2 + 16*a*b - 3*b^2)*cosh(d*x + c)^3 + (10*(35*a^2 + 
 98*a*b + 51*b^2)*cosh(d*x + c)^2 + 105*a^2 + 126*a*b - 63*b^2)*sinh(d*x + 
 c)^3 + 2*(10*(35*a^2 + 56*a*b + 27*b^2)*cosh(d*x + c)^3 + 21*(25*a^2 + 16 
*a*b - 3*b^2)*cosh(d*x + c))*sinh(d*x + c)^2 + 28*(25*a^2 + 4*a*b + 3*b^2) 
*cosh(d*x + c) + (5*(35*a^2 + 98*a*b + 51*b^2)*cosh(d*x + c)^4 + 63*(5*a^2 
 + 6*a*b - 3*b^2)*cosh(d*x + c)^2 + 70*a^2 + 28*a*b + 126*b^2)*sinh(d*x + 
c))/(d*cosh(d*x + c)^9 + 9*d*cosh(d*x + c)*sinh(d*x + c)^8 + d*sinh(d*x + 
c)^9 + 7*d*cosh(d*x + c)^7 + (36*d*cosh(d*x + c)^2 + 7*d)*sinh(d*x + c)^7 
+ 7*(12*d*cosh(d*x + c)^3 + 7*d*cosh(d*x + c))*sinh(d*x + c)^6 + 22*d*cosh 
(d*x + c)^5 + (126*d*cosh(d*x + c)^4 + 147*d*cosh(d*x + c)^2 + 20*d)*sinh( 
d*x + c)^5 + (126*d*cosh(d*x + c)^5 + 245*d*cosh(d*x + c)^3 + 110*d*cosh(d 
*x + c))*sinh(d*x + c)^4 + 42*d*cosh(d*x + c)^3 + (84*d*cosh(d*x + c)^6 + 
245*d*cosh(d*x + c)^4 + 200*d*cosh(d*x + c)^2 + 28*d)*sinh(d*x + c)^3 + (3 
6*d*cosh(d*x + c)^7 + 147*d*cosh(d*x + c)^5 + 220*d*cosh(d*x + c)^3 + 126* 
d*cosh(d*x + c))*sinh(d*x + c)^2 + 56*d*cosh(d*x + c) + (9*d*cosh(d*x + c) 
^8 + 49*d*cosh(d*x + c)^6 + 100*d*cosh(d*x + c)^4 + 84*d*cosh(d*x + c)^2 + 
 14*d)*sinh(d*x + c))
 
3.1.96.6 Sympy [F]

\[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}^{4}{\left (c + d x \right )}\, dx \]

input
integrate(sech(d*x+c)**4*(a+b*tanh(d*x+c)**2)**2,x)
 
output
Integral((a + b*tanh(c + d*x)**2)**2*sech(c + d*x)**4, x)
 
3.1.96.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 928 vs. \(2 (70) = 140\).

Time = 0.21 (sec) , antiderivative size = 928, normalized size of antiderivative = 12.21 \[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\text {Too large to display} \]

input
integrate(sech(d*x+c)^4*(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")
 
output
4/35*b^2*(7*e^(-2*d*x - 2*c)/(d*(7*e^(-2*d*x - 2*c) + 21*e^(-4*d*x - 4*c) 
+ 35*e^(-6*d*x - 6*c) + 35*e^(-8*d*x - 8*c) + 21*e^(-10*d*x - 10*c) + 7*e^ 
(-12*d*x - 12*c) + e^(-14*d*x - 14*c) + 1)) - 14*e^(-4*d*x - 4*c)/(d*(7*e^ 
(-2*d*x - 2*c) + 21*e^(-4*d*x - 4*c) + 35*e^(-6*d*x - 6*c) + 35*e^(-8*d*x 
- 8*c) + 21*e^(-10*d*x - 10*c) + 7*e^(-12*d*x - 12*c) + e^(-14*d*x - 14*c) 
 + 1)) + 70*e^(-6*d*x - 6*c)/(d*(7*e^(-2*d*x - 2*c) + 21*e^(-4*d*x - 4*c) 
+ 35*e^(-6*d*x - 6*c) + 35*e^(-8*d*x - 8*c) + 21*e^(-10*d*x - 10*c) + 7*e^ 
(-12*d*x - 12*c) + e^(-14*d*x - 14*c) + 1)) - 35*e^(-8*d*x - 8*c)/(d*(7*e^ 
(-2*d*x - 2*c) + 21*e^(-4*d*x - 4*c) + 35*e^(-6*d*x - 6*c) + 35*e^(-8*d*x 
- 8*c) + 21*e^(-10*d*x - 10*c) + 7*e^(-12*d*x - 12*c) + e^(-14*d*x - 14*c) 
 + 1)) + 35*e^(-10*d*x - 10*c)/(d*(7*e^(-2*d*x - 2*c) + 21*e^(-4*d*x - 4*c 
) + 35*e^(-6*d*x - 6*c) + 35*e^(-8*d*x - 8*c) + 21*e^(-10*d*x - 10*c) + 7* 
e^(-12*d*x - 12*c) + e^(-14*d*x - 14*c) + 1)) + 1/(d*(7*e^(-2*d*x - 2*c) + 
 21*e^(-4*d*x - 4*c) + 35*e^(-6*d*x - 6*c) + 35*e^(-8*d*x - 8*c) + 21*e^(- 
10*d*x - 10*c) + 7*e^(-12*d*x - 12*c) + e^(-14*d*x - 14*c) + 1))) + 8/15*a 
*b*(5*e^(-2*d*x - 2*c)/(d*(5*e^(-2*d*x - 2*c) + 10*e^(-4*d*x - 4*c) + 10*e 
^(-6*d*x - 6*c) + 5*e^(-8*d*x - 8*c) + e^(-10*d*x - 10*c) + 1)) - 5*e^(-4* 
d*x - 4*c)/(d*(5*e^(-2*d*x - 2*c) + 10*e^(-4*d*x - 4*c) + 10*e^(-6*d*x - 6 
*c) + 5*e^(-8*d*x - 8*c) + e^(-10*d*x - 10*c) + 1)) + 15*e^(-6*d*x - 6*c)/ 
(d*(5*e^(-2*d*x - 2*c) + 10*e^(-4*d*x - 4*c) + 10*e^(-6*d*x - 6*c) + 5*...
 
3.1.96.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (70) = 140\).

Time = 0.36 (sec) , antiderivative size = 238, normalized size of antiderivative = 3.13 \[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {4 \, {\left (105 \, a^{2} e^{\left (10 \, d x + 10 \, c\right )} + 210 \, a b e^{\left (10 \, d x + 10 \, c\right )} + 105 \, b^{2} e^{\left (10 \, d x + 10 \, c\right )} + 455 \, a^{2} e^{\left (8 \, d x + 8 \, c\right )} + 350 \, a b e^{\left (8 \, d x + 8 \, c\right )} - 105 \, b^{2} e^{\left (8 \, d x + 8 \, c\right )} + 770 \, a^{2} e^{\left (6 \, d x + 6 \, c\right )} + 140 \, a b e^{\left (6 \, d x + 6 \, c\right )} + 210 \, b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 630 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 84 \, a b e^{\left (4 \, d x + 4 \, c\right )} - 42 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 245 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} + 98 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 21 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 35 \, a^{2} + 14 \, a b + 3 \, b^{2}\right )}}{105 \, d {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{7}} \]

input
integrate(sech(d*x+c)^4*(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")
 
output
-4/105*(105*a^2*e^(10*d*x + 10*c) + 210*a*b*e^(10*d*x + 10*c) + 105*b^2*e^ 
(10*d*x + 10*c) + 455*a^2*e^(8*d*x + 8*c) + 350*a*b*e^(8*d*x + 8*c) - 105* 
b^2*e^(8*d*x + 8*c) + 770*a^2*e^(6*d*x + 6*c) + 140*a*b*e^(6*d*x + 6*c) + 
210*b^2*e^(6*d*x + 6*c) + 630*a^2*e^(4*d*x + 4*c) + 84*a*b*e^(4*d*x + 4*c) 
 - 42*b^2*e^(4*d*x + 4*c) + 245*a^2*e^(2*d*x + 2*c) + 98*a*b*e^(2*d*x + 2* 
c) + 21*b^2*e^(2*d*x + 2*c) + 35*a^2 + 14*a*b + 3*b^2)/(d*(e^(2*d*x + 2*c) 
 + 1)^7)
 
3.1.96.9 Mupad [B] (verification not implemented)

Time = 1.87 (sec) , antiderivative size = 732, normalized size of antiderivative = 9.63 \[ \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {\frac {4\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{35\,d}+\frac {32\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^2-b^2\right )}{35\,d}+\frac {4\,{\mathrm {e}}^{4\,c+4\,d\,x}\,{\left (a+b\right )}^2}{7\,d}}{4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1}-\frac {\frac {32\,\left (a^2-b^2\right )}{105\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,{\left (a+b\right )}^2}{21\,d}}{3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1}-\frac {\frac {32\,\left (a^2-b^2\right )}{105\,d}+\frac {64\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a^2-b^2\right )}{35\,d}+\frac {16\,{\mathrm {e}}^{6\,c+6\,d\,x}\,{\left (a+b\right )}^2}{21\,d}+\frac {16\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{35\,d}}{5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1}-\frac {\frac {32\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a^2-b^2\right )}{7\,d}+\frac {32\,{\mathrm {e}}^{8\,c+8\,d\,x}\,\left (a^2-b^2\right )}{7\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,{\left (a+b\right )}^2}{7\,d}+\frac {8\,{\mathrm {e}}^{10\,c+10\,d\,x}\,{\left (a+b\right )}^2}{7\,d}+\frac {16\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{7\,d}}{7\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,{\mathrm {e}}^{4\,c+4\,d\,x}+35\,{\mathrm {e}}^{6\,c+6\,d\,x}+35\,{\mathrm {e}}^{8\,c+8\,d\,x}+21\,{\mathrm {e}}^{10\,c+10\,d\,x}+7\,{\mathrm {e}}^{12\,c+12\,d\,x}+{\mathrm {e}}^{14\,c+14\,d\,x}+1}-\frac {\frac {4\,{\left (a+b\right )}^2}{21\,d}+\frac {32\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^2-b^2\right )}{21\,d}+\frac {64\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (a^2-b^2\right )}{21\,d}+\frac {20\,{\mathrm {e}}^{8\,c+8\,d\,x}\,{\left (a+b\right )}^2}{21\,d}+\frac {8\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{7\,d}}{6\,{\mathrm {e}}^{2\,c+2\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}+6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1}-\frac {4\,{\left (a+b\right )}^2}{21\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \]

input
int((a + b*tanh(c + d*x)^2)^2/cosh(c + d*x)^4,x)
 
output
- ((4*(3*a^2 - 2*a*b + 3*b^2))/(35*d) + (32*exp(2*c + 2*d*x)*(a^2 - b^2))/ 
(35*d) + (4*exp(4*c + 4*d*x)*(a + b)^2)/(7*d))/(4*exp(2*c + 2*d*x) + 6*exp 
(4*c + 4*d*x) + 4*exp(6*c + 6*d*x) + exp(8*c + 8*d*x) + 1) - ((32*(a^2 - b 
^2))/(105*d) + (8*exp(2*c + 2*d*x)*(a + b)^2)/(21*d))/(3*exp(2*c + 2*d*x) 
+ 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1) - ((32*(a^2 - b^2))/(105*d) + 
 (64*exp(4*c + 4*d*x)*(a^2 - b^2))/(35*d) + (16*exp(6*c + 6*d*x)*(a + b)^2 
)/(21*d) + (16*exp(2*c + 2*d*x)*(3*a^2 - 2*a*b + 3*b^2))/(35*d))/(5*exp(2* 
c + 2*d*x) + 10*exp(4*c + 4*d*x) + 10*exp(6*c + 6*d*x) + 5*exp(8*c + 8*d*x 
) + exp(10*c + 10*d*x) + 1) - ((32*exp(4*c + 4*d*x)*(a^2 - b^2))/(7*d) + ( 
32*exp(8*c + 8*d*x)*(a^2 - b^2))/(7*d) + (8*exp(2*c + 2*d*x)*(a + b)^2)/(7 
*d) + (8*exp(10*c + 10*d*x)*(a + b)^2)/(7*d) + (16*exp(6*c + 6*d*x)*(3*a^2 
 - 2*a*b + 3*b^2))/(7*d))/(7*exp(2*c + 2*d*x) + 21*exp(4*c + 4*d*x) + 35*e 
xp(6*c + 6*d*x) + 35*exp(8*c + 8*d*x) + 21*exp(10*c + 10*d*x) + 7*exp(12*c 
 + 12*d*x) + exp(14*c + 14*d*x) + 1) - ((4*(a + b)^2)/(21*d) + (32*exp(2*c 
 + 2*d*x)*(a^2 - b^2))/(21*d) + (64*exp(6*c + 6*d*x)*(a^2 - b^2))/(21*d) + 
 (20*exp(8*c + 8*d*x)*(a + b)^2)/(21*d) + (8*exp(4*c + 4*d*x)*(3*a^2 - 2*a 
*b + 3*b^2))/(7*d))/(6*exp(2*c + 2*d*x) + 15*exp(4*c + 4*d*x) + 20*exp(6*c 
 + 6*d*x) + 15*exp(8*c + 8*d*x) + 6*exp(10*c + 10*d*x) + exp(12*c + 12*d*x 
) + 1) - (4*(a + b)^2)/(21*d*(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1))